﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 只读结构
{
    public struct Dimensions2
    {
        public  double Length { get; set; }
        public double Width { get; set; }
        public Dimensions2(double length, double width)
        { Length = length; Width = width; }
        public double Diagonal => Math.Sqrt(Length * Length + Width * Width);
    }
}
